import {createStore} from 'vuex'
import persistedState from 'vuex-persistedstate'
let store = createStore({
    state:{
        userInfo:{}  //登录后的用户信息
    },
    mutations:{
        setUserInfo(state,payload){
            state.userInfo=payload;   //存储用户信息
        }
    },
    plugins: [persistedState()]
})

export default store;